package com.zhny.aiot.zbsyb.sexual.trap.plugin;

import com.zhny.aiot.plugin.ICenterFacilities;
import com.zhny.aiot.plugin.IDevice;
import com.zhny.aiot.plugin.model.DeviceEntity;
import com.zhny.aiot.plugin.model.FactoryType;
import com.zhny.aiot.plugin.model.StoreEntity;
import com.zhny.aiot.plugin.web.WebDeviceFactory;
import com.zhny.aiot.zbsyb.sexual.trap.plugin.model.SexualTrapStoreEntry;
import org.pf4j.Extension;
import org.pf4j.Plugin;
import org.pf4j.PluginWrapper;

public class SexualTrapPlugin extends Plugin {
    public SexualTrapPlugin(PluginWrapper wrapper) {
        super (wrapper);
    }
    @Extension
    public static class SexualTrapFactory extends WebDeviceFactory<SexualTrapConfig> {
        @Override
        public Class<SexualTrapConfig> configClass() {
            return SexualTrapConfig.class;
        }

        @Override
        public IDevice createDevice(ICenterFacilities iCenterFacilities, DeviceEntity deviceEntity) {
            return new SexualTrapDevice(this, iCenterFacilities, deviceEntity);
        }

        public Class<? extends StoreEntity> storeClass() {
            return SexualTrapStoreEntry.class;
        }

        public String getId() {
            return "zbsyb-sexual-trap-plugin";
        }

        public String getName() {
            return "植保事业部性诱捕获器";
        }

        public FactoryType getType() {
            return FactoryType.Picture;
        }
    }
}
